<template>
  <el-dialog title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
    class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
    <el-row :gutter="15" class="">
      <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right">
        <template v-if="!loading">
          <el-col :span="24">
            <el-form-item label-width="80" label="支付类型" prop="type">
              <p>{{dataForm.type}}</p>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label-width="0">
              <div class="JNPF-common-title">
                <h2>支付配置</h2>
              </div>
              <el-table :data="dataForm.assoPayConfigDetailList" size='mini'>
                <el-table-column type="index" width="50" label="序号" align="center" />
                <el-table-column prop="configKey" label="配置KEY">
                  <template slot-scope="scope">
                    <p>{{scope.row.configKey}}</p>
                  </template>
                </el-table-column>
                <el-table-column prop="configValue" label="配置VALUE">
                  <template slot-scope="scope">
                    <p>{{scope.row.configValue}}</p>
                  </template>
                </el-table-column>
              </el-table>
            </el-form-item>
          </el-col>
        </template>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false"> 取 消</el-button>
    </span>
  </el-dialog>
</template>
<script>
  import request from '@/utils/request'
  import PrintBrowse from '@/components/PrintBrowse'
  import jnpf from '@/utils/jnpf'
  export default {
    components: {
      PrintBrowse
    },
    props: [],
    data() {
      return {
        visible: false,
        loading: false,
        printBrowseVisible: false,
        printId: '',
        dataForm: {
          id: '',
          creatoruserid: "",
          creatortime: "",
          type: "",
          assoPayConfigDetailList: [],
        },
      }
    },
    computed: {},
    watch: {},
    created() {
    },
    mounted() {},
    methods: {
      dataInfo(dataAll) {
        let _dataAll = dataAll
        for (let i = 0; i < _dataAll.assoPayConfigDetailList.length; i++) {
          var _list = _dataAll.assoPayConfigDetailList[i];
        }
        this.dataForm = _dataAll
      },
      init(id) {
        this.dataForm.id = id || 0;
        this.visible = true;
        this.$nextTick(() => {
          if (this.dataForm.id) {
            this.loading = true
            request({
              url: '/api/asso/AssoPayConfig/detail/' + this.dataForm.id,
              method: 'get'
            }).then(res => {
              this.dataInfo(res.data)
              this.loading = false
            })
          }
        })
      },
    },
  }
</script>
